<!doctype html>
<html class="no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="description" content="">
	<meta name="keywords" content="">
	<!-- <meta name="viewport" content="width=device-width, initial-scale=0">
	<meta name="viewport" content="width=drvice-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;"> -->
	<meta name="viewport" content="width=device-width,user-scalable=no, initial-scale=1">
	<title>手机微信版一元夺宝商城网</title>
	<link rel="icon" type="image/png" href="../qgj_qt/images/favicon.png">
	<link rel="stylesheet" href="./css/amazeui.min.css">
	<link rel="stylesheet" href="./css/swiper.min.css">
	<link rel="stylesheet" href="./css/app.css">
	<!-- jquery -->
    <script src="./layer/layer.js"></script>
    <script src="layui/layui.js"></script>
    <script src="./static/js/jquery.js"></script>
</head>
<body>
<!-- 外框 -->
<div id="waik">
<!-- 头部 -->
<div id="top" style="background:#D91D37;" class="ziye_top">
    <div class="sos_t sos_t_zy ">
        <div class="fanh_shang fanh_yems">
            <a href="javascript:;" onclick="history.back();"><img src="images/jiant1.png"></a>
        </div>
        <div class="text">注册</div>
    </div>
</div>
<!-- 明细 -->
<div class="zy_login_box_sign">
    <div class="login_box ">
        <div class="zhuce_con">
            <div class="zhuce_tel sign_qieh">
                <form action="se_register" method="post">
                    @csrf
                    <input type="hidden" id="_token" value="<?php echo csrf_token();?>"/>
                    <div>
                        <label><a><img src="./images/zy_icon_user.png"></a>
                            <input type="text" id="username" name="username" placeholder="用户名">
                        </label>
                    </div>
                    <div>
                        <label><a><img src="./images/zy_icon_user.png"></a>
                            <input type="text" id="userphone" name="userphone" placeholder="手机号">
                        </label>
                    </div>
                    <div>
                        <label class="ms sign_ms" >
                            <a><img src="./images/zy_icon_mm.png"></a>
                            <input type="password" id="password" name="password" placeholder="请输入密码">
                        </label>
                    </div>

                    <button type="submit" id="submit" class="denglu" style="margin-left:70px;height: 30px;width: 200px;">注 册</button>
                </form>
                <!--  -->
            </div>
        </div>
</div>
<!-- 底部 -->
<div class="my_yve_footer">
    <a class="#">登录时即代表您已经同意<em>《广告之家服务政策》</em></a>
</div>
</div>
</body>
</html>

<script>
    $(function(){
        $('#submit').click(function () {
            $.get({
                url:"se_register",
                data:'username='+$('#username').val()+'&password='+$('#password').val()+'&userphone='+$('#userphone').val(),
                success:function (data) {
                    layui.use('layer', function(){
                        var layer = layui.layer;
                        if(data.code=='1') {
                            layer.open({
                                title: '注册成功'
                                , skin: 'msg'
                                , content: data.name
                                , yes: function () {
                                    location.href = data.url;
                                }
                            });
                        }else if(data.code=='-1'){
                            layer.open({
                                title: '注册失败'
                                , skin: 'msg'
                                , content: data.name
                                , yes: function () {
                                    location.href = '/register';
                                }
                            });
                        };
                    });
                }
            });
            return false;
        })
        });
</script>
